<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="application/rdf+xml; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>  

<%@page import="net.groupme.api.ontology.GroupMeOntology"%>
<%@page import="net.groupme.api.ontology.FOAFOntology"%>
<%@page import="net.groupme.api.ontology.TagOntology"%>
<rdf:RDF
    xmlns="<%= GroupMeOntology.NS %>"
    xmlns:foaf="<%= FOAFOntology.NS %>"
    xmlns:dct="http://purl.org/dc/terms/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:tags="<%= TagOntology.NS %>"
  xml:base="<%= GroupMeOntology.BASE %>">

  <<%= GroupMeOntology.GROUP %> rdf:about="<c:out value='${groupManager.group.URI}' />">
      <dc:title><c:out value="${groupManager.group.name}" /></dc:title>
      <dc:description><c:out value="${groupManager.group.description}" ></c:out></dc:description>
      <c:forEach items="${groupManager.group.resources}" var="res" varStatus="status">
			<<%= GroupMeOntology.CONTAINS %>> 
			<foaf:Document rdf:about="<c:out value='${res.URI}'/>">
				<rdfs:seeAlso rdf:resource="<c:out value='${res.URL}'/>"/>
			</foaf:Document>
			</<%= GroupMeOntology.CONTAINS %>>
	  </c:forEach>
	  <c:forEach items="${groupManager.group.creators}" var="user" varStatus="status">
			<foaf:<%= FOAFOntology.MAKER %>>
				<foaf:<%= FOAFOntology.PERSON %> rdf:about="<c:out value='${user.URI}'/>">
					<foaf:<%= FOAFOntology.NAME %>><c:out value='${user.firstName}'/> <c:out value='${user.lastName}'/></foaf:<%= FOAFOntology.NAME %>>
					<c:if test="${user.photo != null}">
					  <foaf:img rdf:resource="<c:out value='${user.photo}'/>"/>
					</c:if>
					<c:if test="${user.foaf != null}">
					  <rdfs:seeAlso rdf:resource="<c:out value="${user.foaf}"/>"/>
					</c:if>
				</foaf:<%= FOAFOntology.PERSON%>>
			</foaf:<%= FOAFOntology.MAKER %>>
	  </c:forEach>
	  <c:forEach items="${groupManager.group.tags}" var="tag" varStatus="status">
	  	<tags:<%= TagOntology.TAGGED_WITH_TAG %>>
	  		<tags:<%= TagOntology.TAG %> rdf:about="<c:out value='${tag.URI}'/>">
	  			<tags:<%= TagOntology.NAME %>><c:out value='${tag.keyword}'/></tags:<%= TagOntology.NAME %>>
	  		</tags:<%= TagOntology.TAG %>>
	  	</tags:<%= TagOntology.TAGGED_WITH_TAG %>>
	  </c:forEach>
  </<%= GroupMeOntology.GROUP %>>
</rdf:RDF>